package com.example.club

import android.os.Bundle
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.therouter.router.Route
import com.example.club.adapter.RecommendClubAdapter
import com.example.club.model.RecommendClub
import com.therouter.TheRouter

@Route(path = "club/ClubActivity")
class ClubActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_club)

        val recommendList = listOf(
            RecommendClub(
                R.drawable.car6,
                "小胖虎俱乐部",
                "欢迎你的加入",
                3.0f,
                100,
                1.0f
            ),
            RecommendClub(
                R.drawable.car6,
                "极速骑士团",
                "速度与激情",
                4.0f,
                80,
                2.5f
            ),
            RecommendClub(
                R.drawable.car6,
                "极速骑士团",
                "速度与激情",
                4.0f,
                80,
                2.5f
            ),
            RecommendClub(
                R.drawable.car6,
                "极速骑士团",
                "速度与激情",
                4.0f,
                80,
                2.5f
            )
            , RecommendClub(
                R.drawable.car6,
                "极速骑士团",
                "速度与激情",
                4.0f,
                80,
                2.5f
            )
            , RecommendClub(
                R.drawable.car6,
                "极速骑士团",
                "速度与激情",
                4.0f,
                80,
                2.5f
            )
            // 可继续添加更多

        )
        val recyclerView = findViewById<RecyclerView>(R.id.club_list_recycler)
        recyclerView.layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
        recyclerView.adapter = RecommendClubAdapter(recommendList)
        findViewById<ImageView>(R.id.iv_back).setOnClickListener {
            finish()
        }
    }
}